<%--
  Created by IntelliJ IDEA.
  User: 86166
  Date: 2024/08/17
  Time: 20:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>融资管理系统</title>
    <%
        String base = request.getContextPath() + "/";
        String url = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + base;
    %>
    <base href="<%=url%>">
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            // var voucher_id = $("[name='hitxt']").val();
            var voucher_id = '<%=request.getParameter("id")%>';
            $.get("systerm/ticketDetail", {"voucher_id": voucher_id}, function (ticket) {
                JSON.stringify(ticket);
                console.log(ticket);
                //凭证编号
                $("#no").empty();
                $("<tr>" +
                    "<td>" + ticket.no + "</td>" +
                    "</tr>").appendTo("[id='no']");
                //凭证来源
                $("#source").empty();
                $("<tr>" +
                    "<td>" + ticket.source + "</td>" +
                    "</tr>").appendTo("[id='source']");
                //开单企业
                $("#kname").empty();
                $("<tr>" +
                    "<td>" + ticket.enterprise_name + "</td>" +
                    "</tr>").appendTo("[id='kname']");
                //收单企业
                $("#sname").empty();
                $("<tr>" +
                    "<td>" +  ticket.open_enterprise_name+ "</td>" +
                    "</tr>").appendTo("[id='sname']");
                //收单企业的社会信用代码
                $("#ssocial_uniform_code").empty();
                $("<tr>" +
                    "<td>" + ticket.social_uniform_code + "</td>" +
                    "</tr>").appendTo("[id='ssocial_uniform_code']");
                //开单企业的社会信用代码
                $("#ksocial_uniform_code").empty();
                $("<tr>" +
                    "<td>" + ticket.open_social_uniform_code + "</td>" +
                    "</tr>").appendTo("[id='ksocial_uniform_code']");
                //金融机构名称
                $("#jname").empty();
                $("<tr>" +
                    "<td>" + ticket.instituty_name + "</td>" +
                    "</tr>").appendTo("[id='jname']");

                //凭证金额
                $("#amout").empty();
                $("<tr>" +
                    "<td>" + ticket.amount + "</td>" +
                    "</tr>").appendTo("[id='amout']");
                //开单时间
                $("#open_time").empty();
                $("<tr>" +
                    "<td>" + ticket.open_time + "</td>" +
                    "</tr>").appendTo("[id='open_time']");
                //计算天数间隔
                var now=new Date();
                var eDate = Date.parse(ticket.expiry_time)
                var days = Math.ceil((eDate - now) / (24 * 60 * 60 * 1000))
                //到期时间
                $("#expiry_time").empty();
                $("<tr>" +
                    "<td>" + ticket.expiry_time +"<span style='font-size: 12px;color: #999'>剩余"+days+"天</span>"+ "</td>" +
                    "</tr>").appendTo("[id='expiry_time']");
                //付息方式
                $("#payment").empty();
                $("<tr>" +
                    "<td>" + ticket.payment_interest_type + "</td>" +
                    "</tr>").appendTo("[id='payment']");
                //备注
                $("#remark").empty();
                $("<tr>" +
                    "<td>" + ticket.remark + "</td>" +
                    "</tr>").appendTo("[id='remark']");
            });
        });
    </script>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="assets/css/admin.css">
    <link rel="stylesheet" href="assets/css/app.css">
</head>
<body data-type="generalComponents">
<input type="hidden" name="hitxt" value="<%=request.getParameter("id")%>">
<header class="am-topbar am-topbar-inverse admin-header">
    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">
            <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                    <span class="tpl-header-list-user-nick">禁言小张</span><span class="tpl-header-list-user-ico"> <img
                        src="assets/img/user01.png"></span>
                </a>
                <ul class="am-dropdown-content">
                    <li><a href="login.jsp"><span class="am-icon-power-off"></span> 退出</a></li>
                </ul>
            </li>
        </ul>
    </div>
</header>
<div class="tpl-page-container tpl-page-header-fixed">
    <div class="tpl-left-nav tpl-left-nav-hover">
        <div class="tpl-left-nav-list">
            <ul class="tpl-left-nav-menu">
                <li class="tpl-left-nav-item">
                    <a href="javascript:;" class="nav-link tpl-left-nav-link-list ">
                        <i class="am-icon-table"></i>
                        <span>凭证管理</span>
                        <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                    </a>
                    <ul class="tpl-left-nav-sub-menu">
                        <li>
                            <a href="finance-list.jsp">
                                <i class="am-icon-angle-right"></i>
                                <span>融资列表</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="tpl-left-nav-item">
                    <a href="javascript:;" class="nav-link tpl-left-nav-link-list" active>
                        <i class="am-icon-wpforms"></i>
                        <span>我的凭证</span>
                        <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right"></i>
                    </a>
                    <ul class="tpl-left-nav-sub-menu" style="display:block">
                        <li>
                            <a href="my-ticket-list.jsp" class="active">
                                <i class="am-icon-angle-right"></i>
                                <span>我的凭证列表</span>
                            </a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <div class="tpl-content-wrapper">
        <div class="tpl-content-page-title">
            我的凭证详情
        </div>
        <ol class="am-breadcrumb">
            <li class="am-active"><a style="color: #999999;">我的凭证</a></li>
            <li class="am-active">我的凭证</li>
            <li class="am-active">我的凭证详情</li>
        </ol>
        <div class="tpl-portlet-components">
            <div class="portlet-title">
                <div class="caption font-green bold">
                    凭证基本信息
                </div>
                <div class="tpl-portlet-input tpl-fz-ml">
                    <div class="portlet-input input-small input-inline">
                        <div class="input-icon right">
                        </div>
                    </div>
                </div>
            </div>
            <div class="tpl-block ">
                <div class="am-g tpl-amazeui-form">
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <%--@declare id="user-name"--%><label for="user-name" class="am-u-sm-3 am-form-label">凭证编号</label>
                                <div id="no" class="am-u-sm-9" style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">凭证来源</label>
                                <div id="source" class="am-u-sm-9" style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">开单企业</label>
                                <div id="kname" class="am-u-sm-9" style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">统一社会信用代码</label>
                                <div id="ksocial_uniform_code" class="am-u-sm-9"
                                     style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">收单企业</label>
                                <div id="sname" class="am-u-sm-9" style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">统一社会信用代码</label>
                                <div id="ssocial_uniform_code" class="am-u-sm-9"
                                     style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">金融机构</label>
                                <div id="jname" class="am-u-sm-9" style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">凭证金额</label>
                                <div id="amout" class="am-u-sm-9" style="font-size: 19px;color: red;font-weight: 500;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">开单日期</label>
                                <div id="open_time" class="am-u-sm-9" style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">到期日期</label>
                                <div id="expiry_time" class="am-u-sm-9" style="margin-top: 4px;font-size: 16px;">
                                    <span style="font-size: 12px;color: #999">剩余 10 天</span>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">付息方式</label>
                                <div id="payment" class="am-u-sm-9" style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                        <form class="am-form am-form-horizontal">
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">备注</label>
                                <div id="remark" class="am-u-sm-9" style="margin-top: 4px;font-size: 16px;">

                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-u-sm-12 am-u-md-6">
                    </div>
                </div>
            </div>
            <div style="text-align: center;margin-top:40px">
                <a class="am-btn am-btn-default" href="my-ticket-list.jsp">返&nbsp;&nbsp;&nbsp;&nbsp; 回</a>
            </div>
        </div>
    </div>
</div>

<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/app.js"></script>
<script>

</script>
</body>

</html>
